package com.mlick.a.java8;

import org.junit.Test;

import java.util.Optional;

/**
 * @author lixiangxin
 * @date 2019/5/6 17:51
 **/
public class OptinalTest {


  String s = "";

  @Test
  public void t1() {
    Optional optional = Optional.ofNullable(s);

//    String hello = optional.map(new Function() {
//      @Override
//      public String apply(String o) {
//        return "ss";
//      }
//    }).orElse("hello");

  }



}
